import pandas as pd


def excel(shop_name, date_lastmonth, file_path):
    # 读取Excel文件
    df = pd.read_excel(file_path, engine='openpyxl', dtype=object)
    if df.empty:
        return
    # 添加店铺和日期列并复制数据
    df.insert(2, '店铺', shop_name)
    # 保存到新的Excel文件
    df.to_excel("C:\\抖音小额打款\\" + date_lastmonth + "\\" + shop_name + ".xlsx", index=False, engine='openpyxl')
